<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    // 先从自身对象上面查找，本身如果没有，在原型上面查找，依次向下查找，如果都没有，打印undefined或者报错
    // 字面量创建原型：获取不到，地址不一样
    function Car(name){
        this.name = name
    }
    let car_1 = new Car('小米')
    // Car.prototype.size = '100000'
    // Car.prototype = {
    //     cnstructor:Car,
    //     color:'red'
    // }
    Car.prototype.color = 'pink'
    console.log(car_1);
    console.log(Car.prototype);
    console.log(Car.prototype.constructor);
</script>
</html>